package com.youlu.campus.admin.card.controller;

import com.youlu.campus.admin.card.dto.CardOrderSearchDTO;
import com.youlu.campus.admin.card.service.CardOrderService;
import com.yuelin.infrastructure.quantum.common.QResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 会员卡订单
 * @author : [dengbo]
 * @className : CardOrderController
 * @description : [会员卡订单]
 * @createTime : [2022/12/20 15:41]
 */
@Slf4j
@RestController
@RequestMapping("/ts-card/")
public class CardOrderController {
    @Autowired
    private CardOrderService cardOrderService;

    /**
     * 会员卡订单列表
     * @param dto
     * @return
     */
    @PostMapping("/order/list")
    public QResult cardOrderList(@Validated @RequestBody CardOrderSearchDTO dto) {
        return QResult.success(cardOrderService.list(dto));
    }
}
